package com.elite.groovy.davco.init;

import com.elite.groovy.davco.clink.ClinkUtils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

import java.text.SimpleDateFormat;
import java.util.HashMap;
import java.util.Map;

/**
 * @projectName: Degao_Clink
 * @package: com.elite.groovy.davco.clink
 * @className: SignUtil
 * @description: TODO
 * @author: LiJT
 * @date: 2023-10-27 11:13
 * @version: 1.0
 */
public class initClinkReport2 {
    private static final Log log = LogFactory.getLog(initClinkReport.class);
    private static Map<String, String> headMap = new HashMap<String, String>();

    public static void main(String[] args) throws Exception {
        // 创建日期格式对象并设置要输出的格式
        SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd");

        String StartTime = "20240131";
        System.out.println("♻同步日期:" + StartTime);
        log.debug("系统接入 StartTime:" + StartTime);

        // 系统接入-GET
        // String getPath = "/cc/stat_ivr_list?";
        String getPath = "/cc/stat_client?";

        // 封装调用头Heads
        Map<String, String> headMap2 = new HashMap<String, String>();
        headMap2.put("Content-Type", "application/x-www-form-urlencoded");
        log.debug("系统接入 headMap:" + headMap2);

        // 封装调用头Params
        Map<String, String> queryParams = new HashMap<String, String>();
        queryParams.put("date", StartTime);
        log.debug("系统接入 queryParams:" + queryParams);

        String doGETRes = ClinkUtils.doClinkCall2("POST", getPath, queryParams, headMap2, null);
        log.debug("系统接入 doGETRes:" + doGETRes);

    }



}